package com.boy.controller;

import com.boy.service.MailService;
import com.boy.tool.annotate.Arbitrarily;
import com.boy.tool.domain.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author whd
 * @date 2024/06/06 11:49:30
 */
@RestController
@RequestMapping("/mail")
public class MailController {
    @Autowired
    private MailService mailService;

    @Arbitrarily
    @PostMapping("/put")
    public ResultVo put(@RequestParam String email) {
        mailService.sendMail(email);
        return ResultVo.success();
    }
}
